// 用户相关接口请求
import request from '@/utils/request'

// export function reqlogin(data) {
//   return request({
//     url: '/Auth/Login',
//     method: 'post',
//     data
//   })
// }
// login优化写法
export const reqlogin = (data) => request({
  url: '/Auth/Login',
  method: 'post',
  data
})
// login优化写法2.0
// export const reqlogin = (data) => request.post('/vue-element-admin/user/login', data)

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
/**
 * 获取数据跳出循环
 */
export const getUserInfoApi = (data) => request({
  url: '/Auth/Test',
  method: 'post',
  data
})
